<?php
function vailemail($email){
	if ($email == "")
	{
		return -1;
	}
	else {
		list($name,$comp)=split('[@]',$email);
		if ($comp==""){
			return -2;
		}
		else{
			$comptemp=split('[.]',$comp);
			foreach($comptemp as $i){
				if ($i==""){
					return -2;
				}
			}
		}
	}
	return 1;
}

function vailname($name){
	if($name==""){
		return -1;
	}
	return 1;
}

?>